Skip to content

Test cookie.path_specified == False#245

Open
Gallaecio wants to merge 1 commit intoscrapy-plugins:masterfrom
Gallaecio:test-coverage
Open

Test cookie.path_specified == False#245
Gallaecio wants to merge 1 commit intoscrapy-plugins:masterfrom
Gallaecio:test-coverage

Conversation

@Gallaecio
Copy link
Copy Markdown
Contributor

@kmike I’m extremely unsure about this change, I have no idea of the side effects it may have.

I am trying to add test coverage to https://codecov.io/gh/scrapy-plugins/scrapy-splash/src/master/scrapy_splash/cookies.py#L111

This change adds such coverage, and ensures that cookie_to_har(har_to_cookie(har_cookie)) == har_cookie works if no path is specified.

On the other hand, setting / as a default path comes from Requests, where it’s still used. Their implementation does have a difference that we lost when we simplified our code: they set path='/' if the path parameter is not received, but if path=None is received that None value is used instead; but I’m not sure if that is relevant to our use case, and it would not make cookie_to_har(har_to_cookie(har_cookie)) == har_cookie work either.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2019

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@e40ca4f). Learn more about missing BASE report.
⚠️ Report is 64 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #245   +/-   ##
=========================================
  Coverage          ?   92.84%           
=========================================
  Files             ?        9           
  Lines             ?      587           
  Branches          ?      118           
=========================================
  Hits              ?      545           
  Misses            ?       21           
  Partials          ?       21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant